package com.web.dao.remark;

import com.web.bean.chapter.Chapter;
import com.web.bean.remark.Answer;
import com.web.bean.remark.Remark;

import java.util.List;

/**
 * @autor Chen
 * @create 2021--25-13:06
 * @desc
 */
public interface RemarkDao {
    //
    List<Remark> selectRemarksForChapter(String nid,String chapterid) throws Exception;
    //这里的所有Id都为rid
    Remark selectRemarkForChapterById(String id) throws  Exception;
    void updateRemarkForChapter(Remark remark) throws Exception;
    void addRemarkForChapter(Remark remark) throws Exception;
    //这里的所有Id都为rid
    void deleteRemarkForChapter(String id) throws Exception;

    //对书的评论 能回复，思考怎么关联s
    List<Remark> selectRemarksForNovel() throws Exception;
    List<Remark> selectRemarkForNovelById(String id) throws Exception;
    void updateRemarkForNovel(Remark remark) throws  Exception;
    void addRemarkForNovel(Remark remark) throws Exception;
    void deleteRemarkForNovel(String id) throws Exception;
    /*查找所有Rid*/
    List<String> selectAllRid() throws Exception;

    /*通过rid删除总评或者章节评论*/
    void deleteRemarkById(String rid) throws Exception;
    /*选择所有aid*/
    List<String> selectAllAid() throws Exception;
    /*插入回复*/
    void addReply(Answer answer) throws Exception;
    Integer selectReplyCount(String rid) throws  Exception;

    void updateReplyCount(String rid,String replyCount) throws Exception;
    List<Answer> selectAnswer(String rid) throws  Exception;
}
